package thread;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

public class Demo49 {
    public static void main(String[] args) throws IOException {
        byte[] data = new byte[1024];
        try (InputStream inputStream = new FileInputStream("./test.txt");) {
            int n = inputStream.read(data);
            for (int i = 0; i < n; i++) {
                System.out.printf("0x%x\n", data[i]);
            }
        }
    }
}
